static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
static unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 };
+ u8 x;
+ unsigned reg;
+
pirq--;
- if (pirq < 8) {
- u8 x;
- unsigned reg = 0x48 + (pirq >> 1);
- pci_read_config_byte(router, reg, &x);
- return irqmap[(pirq & 1) ? (x >> 4) : (x & 0x0f)];
- }
- return 0;
+ reg = 0x48 + (pirq >> 1);
+ pci_read_config_byte(router, reg, &x);
+ return irqmap[(pirq & 1) ? (x >> 4) : (x & 0x0f)];
}
static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
static unsigned char irqmap[16] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 };
unsigned int val = irqmap[irq];
pirq--;
- if (val && pirq < 8) {
+ if (val) {
u8 x;
unsigned reg = 0x48 + (pirq >> 1);
pci_read_config_byte(router, reg, &x);
latency = orig_latency = elevator_request_latency(elevator, rw);
sequence = elevator->sequence;
+ entry = head;
if (q->head_active && !q->plugged)
head = head->next;
- entry = head;
while ((entry = entry->prev) != head && !starving) {
*req = blkdev_entry_to_request(entry);
latency += (*req)->nr_segments;
struct list_head *entry, *head = &q->queue_head;
unsigned int count = bh->b_size >> 9;
+ entry = head;
if (q->head_active && !q->plugged)
head = head->next;
- entry = head;
while ((entry = entry->prev) != head) {
*req = blkdev_entry_to_request(entry);
if (!(*req)->elevator_sequence)
req = __get_request_wait(q, rw);
spin_lock_irq(&io_request_lock);
-
- /*
- * revalidate elevator, queue request_lock was dropped
- */
- head = &q->queue_head;
- if (q->head_active && !q->plugged)
- head = head->next;
-
}
+ head = &q->queue_head;
+ if (q->head_active && !q->plugged)
+ head = head->next;
+
/* fill up the request-info, and add it to the queue */
req->cmd = rw;
req->errors = 0;
* If we use the IO-APIC for IRQ routing, disable automatic
* assignment of PCI IRQ's.
*/
-#define io_apic_assign_pci_irqs (!mp_irq_entries)
+#define io_apic_assign_pci_irqs (mp_irq_entries != 0)
#else /* !CONFIG_X86_IO_APIC */
#define io_apic_assign_pci_irqs 0