Loading drivers/scsi/hpsa.c +16 −8 Original line number Diff line number Diff line Loading @@ -194,7 +194,8 @@ static int number_of_controllers; static irqreturn_t do_hpsa_intr_intx(int irq, void *dev_id); static irqreturn_t do_hpsa_intr_msi(int irq, void *dev_id); static int hpsa_ioctl(struct scsi_device *dev, int cmd, void *arg); static void start_io(struct ctlr_info *h); static void lock_and_start_io(struct ctlr_info *h); static void start_io(struct ctlr_info *h, unsigned long *flags); #ifdef CONFIG_COMPAT static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void *arg); Loading Loading @@ -845,8 +846,8 @@ static void enqueue_cmd_and_start_io(struct ctlr_info *h, spin_lock_irqsave(&h->lock, flags); addQ(&h->reqQ, c); h->Qdepth++; start_io(h, &flags); spin_unlock_irqrestore(&h->lock, flags); start_io(h); } static inline void removeQ(struct CommandList *c) Loading Loading @@ -5459,13 +5460,12 @@ static void __iomem *remap_pci_mem(ulong base, ulong size) /* Takes cmds off the submission queue and sends them to the hardware, * then puts them on the queue of cmds waiting for completion. * Assumes h->lock is held */ static void start_io(struct ctlr_info *h) static void start_io(struct ctlr_info *h, unsigned long *flags) { struct CommandList *c; unsigned long flags; spin_lock_irqsave(&h->lock, flags); while (!list_empty(&h->reqQ)) { c = list_entry(h->reqQ.next, struct CommandList, list); /* can't do anything if fifo is full */ Loading @@ -5490,10 +5490,18 @@ static void start_io(struct ctlr_info *h) h->commands_outstanding++; /* Tell the controller execute command */ spin_unlock_irqrestore(&h->lock, flags); spin_unlock_irqrestore(&h->lock, *flags); h->access.submit_command(h, c); spin_lock_irqsave(&h->lock, flags); spin_lock_irqsave(&h->lock, *flags); } } static void lock_and_start_io(struct ctlr_info *h) { unsigned long flags; spin_lock_irqsave(&h->lock, flags); start_io(h, &flags); spin_unlock_irqrestore(&h->lock, flags); } Loading Loading @@ -5561,7 +5569,7 @@ static inline void finish_cmd(struct CommandList *c) else if (c->cmd_type == CMD_IOCTL_PEND) complete(c->waiting); if (unlikely(io_may_be_stalled)) start_io(h); lock_and_start_io(h); } static inline u32 hpsa_tag_contains_index(u32 tag) Loading Loading
drivers/scsi/hpsa.c +16 −8 Original line number Diff line number Diff line Loading @@ -194,7 +194,8 @@ static int number_of_controllers; static irqreturn_t do_hpsa_intr_intx(int irq, void *dev_id); static irqreturn_t do_hpsa_intr_msi(int irq, void *dev_id); static int hpsa_ioctl(struct scsi_device *dev, int cmd, void *arg); static void start_io(struct ctlr_info *h); static void lock_and_start_io(struct ctlr_info *h); static void start_io(struct ctlr_info *h, unsigned long *flags); #ifdef CONFIG_COMPAT static int hpsa_compat_ioctl(struct scsi_device *dev, int cmd, void *arg); Loading Loading @@ -845,8 +846,8 @@ static void enqueue_cmd_and_start_io(struct ctlr_info *h, spin_lock_irqsave(&h->lock, flags); addQ(&h->reqQ, c); h->Qdepth++; start_io(h, &flags); spin_unlock_irqrestore(&h->lock, flags); start_io(h); } static inline void removeQ(struct CommandList *c) Loading Loading @@ -5459,13 +5460,12 @@ static void __iomem *remap_pci_mem(ulong base, ulong size) /* Takes cmds off the submission queue and sends them to the hardware, * then puts them on the queue of cmds waiting for completion. * Assumes h->lock is held */ static void start_io(struct ctlr_info *h) static void start_io(struct ctlr_info *h, unsigned long *flags) { struct CommandList *c; unsigned long flags; spin_lock_irqsave(&h->lock, flags); while (!list_empty(&h->reqQ)) { c = list_entry(h->reqQ.next, struct CommandList, list); /* can't do anything if fifo is full */ Loading @@ -5490,10 +5490,18 @@ static void start_io(struct ctlr_info *h) h->commands_outstanding++; /* Tell the controller execute command */ spin_unlock_irqrestore(&h->lock, flags); spin_unlock_irqrestore(&h->lock, *flags); h->access.submit_command(h, c); spin_lock_irqsave(&h->lock, flags); spin_lock_irqsave(&h->lock, *flags); } } static void lock_and_start_io(struct ctlr_info *h) { unsigned long flags; spin_lock_irqsave(&h->lock, flags); start_io(h, &flags); spin_unlock_irqrestore(&h->lock, flags); } Loading Loading @@ -5561,7 +5569,7 @@ static inline void finish_cmd(struct CommandList *c) else if (c->cmd_type == CMD_IOCTL_PEND) complete(c->waiting); if (unlikely(io_may_be_stalled)) start_io(h); lock_and_start_io(h); } static inline u32 hpsa_tag_contains_index(u32 tag) Loading