Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixe…
Browse files Browse the repository at this point in the history
…s-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] NCR5380: Fix bugs and canonicalize irq handler usage
  [SCSI] zfcp: fix cleanup of dismissed error recovery actions
  [SCSI] zfcp: fix dismissal of error recovery actions
  [SCSI] qla1280: convert to use the data buffer accessors
  [SCSI] iscsi: return data transfer residual for data-out commands
  [SCSI] iscsi_tcp: fix potential lockup with write commands
  [SCSI] aacraid: fix security weakness
  [SCSI] aacraid: fix up le32 issues in BlinkLED
  [SCSI] aacraid: fix potential panic in thread stop
  [SCSI] aacraid: don't assign cpu_to_le32(constant) to u8
  • Loading branch information
Linus Torvalds committed Dec 3, 2007
2 parents 8002ced + 1e64166 commit 26145f7
Show file tree
Hide file tree
Showing 15 changed files with 292 additions and 346 deletions.
18 changes: 9 additions & 9 deletions drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,9 @@ static void zfcp_erp_action_dismiss(struct zfcp_erp_action *erp_action)
debug_text_event(adapter->erp_dbf, 2, "a_adis");
debug_event(adapter->erp_dbf, 2, &erp_action->action, sizeof (int));

zfcp_erp_async_handler_nolock(erp_action, ZFCP_STATUS_ERP_DISMISSED);
erp_action->status |= ZFCP_STATUS_ERP_DISMISSED;
if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING)
zfcp_erp_action_ready(erp_action);
}

int
Expand Down Expand Up @@ -1063,7 +1065,7 @@ zfcp_erp_thread(void *data)
&adapter->status)) {

write_lock_irqsave(&adapter->erp_lock, flags);
next = adapter->erp_ready_head.prev;
next = adapter->erp_ready_head.next;
write_unlock_irqrestore(&adapter->erp_lock, flags);

if (next != &adapter->erp_ready_head) {
Expand Down Expand Up @@ -1153,15 +1155,13 @@ zfcp_erp_strategy(struct zfcp_erp_action *erp_action)

/*
* check for dismissed status again to avoid follow-up actions,
* failing of targets and so on for dismissed actions
* failing of targets and so on for dismissed actions,
* we go through down() here because there has been an up()
*/
retval = zfcp_erp_strategy_check_action(erp_action, retval);
if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED)
retval = ZFCP_ERP_CONTINUES;

switch (retval) {
case ZFCP_ERP_DISMISSED:
/* leave since this action has ridden to its ancestors */
debug_text_event(adapter->erp_dbf, 6, "a_st_dis2");
goto unlock;
case ZFCP_ERP_NOMEM:
/* no memory to continue immediately, let it sleep */
if (!(erp_action->status & ZFCP_STATUS_ERP_LOWMEM)) {
Expand Down Expand Up @@ -3089,7 +3089,7 @@ zfcp_erp_action_enqueue(int action,
++adapter->erp_total_count;

/* finally put it into 'ready' queue and kick erp thread */
list_add(&erp_action->list, &adapter->erp_ready_head);
list_add_tail(&erp_action->list, &adapter->erp_ready_head);
up(&adapter->erp_ready_sem);
retval = 0;
out:
Expand Down
8 changes: 4 additions & 4 deletions drivers/scsi/aacraid/commsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,10 +1339,10 @@ int aac_check_health(struct aac_dev * aac)
aif = (struct aac_aifcmd *)hw_fib->data;
aif->command = cpu_to_le32(AifCmdEventNotify);
aif->seqnum = cpu_to_le32(0xFFFFFFFF);
aif->data[0] = cpu_to_le32(AifEnExpEvent);
aif->data[1] = cpu_to_le32(AifExeFirmwarePanic);
aif->data[2] = cpu_to_le32(AifHighPriority);
aif->data[3] = cpu_to_le32(BlinkLED);
aif->data[0] = AifEnExpEvent;
aif->data[1] = AifExeFirmwarePanic;
aif->data[2] = AifHighPriority;
aif->data[3] = BlinkLED;

/*
* Put the FIB onto the
Expand Down
7 changes: 4 additions & 3 deletions drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
static int aac_cfg_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
if (!capable(CAP_SYS_ADMIN))
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
return aac_do_ioctl(file->private_data, cmd, (void __user *)arg);
}
Expand Down Expand Up @@ -691,7 +691,7 @@ static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)

static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long arg)
{
if (!capable(CAP_SYS_ADMIN))
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
return aac_compat_do_ioctl((struct aac_dev *)file->private_data, cmd, arg);
}
Expand Down Expand Up @@ -950,7 +950,8 @@ static struct scsi_host_template aac_driver_template = {

static void __aac_shutdown(struct aac_dev * aac)
{
kthread_stop(aac->thread);
if (aac->aif_thread)
kthread_stop(aac->thread);
aac_send_shutdown(aac);
aac_adapter_disable_int(aac);
free_irq(aac->pdev->irq, aac);
Expand Down
10 changes: 5 additions & 5 deletions drivers/scsi/atari_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy)

#endif /* REAL_DMA */

NCR5380_intr(0, 0);
NCR5380_intr(irq, dummy);

#if 0
/* To be sure the int is not masked */
Expand Down Expand Up @@ -458,7 +458,7 @@ static irqreturn_t scsi_falcon_intr(int irq, void *dummy)

#endif /* REAL_DMA */

NCR5380_intr(0, 0);
NCR5380_intr(irq, dummy);
return IRQ_HANDLED;
}

Expand Down Expand Up @@ -684,7 +684,7 @@ int atari_scsi_detect(struct scsi_host_template *host)
* interrupt after having cleared the pending flag for the DMA
* interrupt. */
if (request_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr, IRQ_TYPE_SLOW,
"SCSI NCR5380", scsi_tt_intr)) {
"SCSI NCR5380", instance)) {
printk(KERN_ERR "atari_scsi_detect: cannot allocate irq %d, aborting",IRQ_TT_MFP_SCSI);
scsi_unregister(atari_scsi_host);
atari_stram_free(atari_dma_buffer);
Expand All @@ -701,7 +701,7 @@ int atari_scsi_detect(struct scsi_host_template *host)
IRQ_TYPE_PRIO, "Hades DMA emulator",
hades_dma_emulator)) {
printk(KERN_ERR "atari_scsi_detect: cannot allocate irq %d, aborting (MACH_IS_HADES)",IRQ_AUTO_2);
free_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr);
free_irq(IRQ_TT_MFP_SCSI, instance);
scsi_unregister(atari_scsi_host);
atari_stram_free(atari_dma_buffer);
atari_dma_buffer = 0;
Expand Down Expand Up @@ -761,7 +761,7 @@ int atari_scsi_detect(struct scsi_host_template *host)
int atari_scsi_release(struct Scsi_Host *sh)
{
if (IS_A_TT())
free_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr);
free_irq(IRQ_TT_MFP_SCSI, sh);
if (atari_dma_buffer)
atari_stram_free(atari_dma_buffer);
return 1;
Expand Down
5 changes: 3 additions & 2 deletions drivers/scsi/dtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ static int __init dtc_detect(struct scsi_host_template * tpnt)
/* With interrupts enabled, it will sometimes hang when doing heavy
* reads. So better not enable them until I finger it out. */
if (instance->irq != SCSI_IRQ_NONE)
if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED, "dtc", instance)) {
if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED,
"dtc", instance)) {
printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
instance->irq = SCSI_IRQ_NONE;
}
Expand Down Expand Up @@ -459,7 +460,7 @@ static int dtc_release(struct Scsi_Host *shost)
NCR5380_local_declare();
NCR5380_setup(shost);
if (shost->irq)
free_irq(shost->irq, NULL);
free_irq(shost->irq, shost);
NCR5380_exit(shost);
if (shost->io_port && shost->n_io_port)
release_region(shost->io_port, shost->n_io_port);
Expand Down
5 changes: 3 additions & 2 deletions drivers/scsi/g_NCR5380.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ int __init generic_NCR5380_detect(struct scsi_host_template * tpnt)
instance->irq = NCR5380_probe_irq(instance, 0xffff);

if (instance->irq != SCSI_IRQ_NONE)
if (request_irq(instance->irq, generic_NCR5380_intr, IRQF_DISABLED, "NCR5380", instance)) {
if (request_irq(instance->irq, generic_NCR5380_intr,
IRQF_DISABLED, "NCR5380", instance)) {
printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
instance->irq = SCSI_IRQ_NONE;
}
Expand Down Expand Up @@ -513,7 +514,7 @@ int generic_NCR5380_release_resources(struct Scsi_Host *instance)
NCR5380_setup(instance);

if (instance->irq != SCSI_IRQ_NONE)
free_irq(instance->irq, NULL);
free_irq(instance->irq, instance);
NCR5380_exit(instance);

#ifndef CONFIG_SCSI_G_NCR5380_MEM
Expand Down
Loading

0 comments on commit 26145f7

Please sign in to comment.