Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136273
b: refs/heads/master
c: b409063
h: refs/heads/master
i:
  136271: cba0072
v: v3
  • Loading branch information
Tony Battersby authored and James Bottomley committed Mar 12, 2009
1 parent da2451d commit b3f0521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07b9d81e849f64b990e943de6ad75b63dafe5a4b
refs/heads/master: b409063a9b7a56c0d658feaffedeb74ad71edce7
11 changes: 7 additions & 4 deletions trunk/drivers/scsi/sym53c8xx_2/sym_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,12 +1238,13 @@ static int sym53c8xx_proc_info(struct Scsi_Host *shost, char *buffer,
/*
* Free controller resources.
*/
static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev)
static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev,
int do_free_irq)
{
/*
* Free O/S specific resources.
*/
if (pdev->irq)
if (do_free_irq)
free_irq(pdev->irq, np->s.host);
if (np->s.ioaddr)
pci_iounmap(pdev, np->s.ioaddr);
Expand Down Expand Up @@ -1275,6 +1276,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
struct pci_dev *pdev = dev->pdev;
unsigned long flags;
struct sym_fw *fw;
int do_free_irq = 0;

printk(KERN_INFO "sym%d: <%s> rev 0x%x at pci %s irq %u\n",
unit, dev->chip.name, pdev->revision, pci_name(pdev),
Expand Down Expand Up @@ -1364,6 +1366,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
sym_name(np), pdev->irq);
goto attach_failed;
}
do_free_irq = 1;

/*
* After SCSI devices have been opened, we cannot
Expand Down Expand Up @@ -1420,7 +1423,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
return NULL;
printf_info("sym%d: giving up ...\n", unit);
if (np)
sym_free_resources(np, pdev);
sym_free_resources(np, pdev, do_free_irq);
scsi_host_put(shost);

return NULL;
Expand Down Expand Up @@ -1659,7 +1662,7 @@ static int sym_detach(struct Scsi_Host *shost, struct pci_dev *pdev)
udelay(10);
OUTB(np, nc_istat, 0);

sym_free_resources(np, pdev);
sym_free_resources(np, pdev, 1);
scsi_host_put(shost);

return 1;
Expand Down

0 comments on commit b3f0521

Please sign in to comment.