Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34996
b: refs/heads/master
c: 90ee346
h: refs/heads/master
v: v3
  • Loading branch information
Mark Haverkamp authored and James Bottomley committed Aug 19, 2006
1 parent f4bbfb3 commit 4324c15
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 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: 8c23cd7457151fc8ace79ec700a8aeaa9fc5b3d9
refs/heads/master: 90ee346651524eb275405d410f5d3bb6765a2d93
15 changes: 13 additions & 2 deletions trunk/drivers/scsi/aacraid/aachba.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ int aac_probe_container(struct aac_dev *dev, int cid)
unsigned instance;

fsa_dev_ptr = dev->fsa_dev;
if (!fsa_dev_ptr)
return -ENOMEM;
instance = dev->scsi_host_ptr->unique_id;

if (!(fibptr = aac_fib_alloc(dev)))
Expand Down Expand Up @@ -1392,6 +1394,7 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid)
struct scsi_cmnd *cmd;
struct scsi_device *sdev = scsicmd->device;
int active = 0;
struct aac_dev *aac;
unsigned long flags;

/*
Expand All @@ -1413,11 +1416,11 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid)
if (active)
return SCSI_MLQUEUE_DEVICE_BUSY;

aac = (struct aac_dev *)scsicmd->device->host->hostdata;
/*
* Allocate and initialize a Fib
*/
if (!(cmd_fibcontext =
aac_fib_alloc((struct aac_dev *)scsicmd->device->host->hostdata)))
if (!(cmd_fibcontext = aac_fib_alloc(aac)))
return SCSI_MLQUEUE_HOST_BUSY;

aac_fib_init(cmd_fibcontext);
Expand Down Expand Up @@ -1470,6 +1473,8 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
struct aac_dev *dev = (struct aac_dev *)host->hostdata;
struct fsa_dev_info *fsa_dev_ptr = dev->fsa_dev;

if (fsa_dev_ptr == NULL)
return -1;
/*
* If the bus, id or lun is out of range, return fail
* Test does not apply to ID 16, the pseudo id for the controller
Expand Down Expand Up @@ -1782,6 +1787,8 @@ static int query_disk(struct aac_dev *dev, void __user *arg)
struct fsa_dev_info *fsa_dev_ptr;

fsa_dev_ptr = dev->fsa_dev;
if (!fsa_dev_ptr)
return -ENODEV;
if (copy_from_user(&qd, arg, sizeof (struct aac_query_disk)))
return -EFAULT;
if (qd.cnum == -1)
Expand Down Expand Up @@ -1843,6 +1850,10 @@ static int delete_disk(struct aac_dev *dev, void __user *arg)
struct fsa_dev_info *fsa_dev_ptr;

fsa_dev_ptr = dev->fsa_dev;
if (!fsa_dev_ptr)
return -ENODEV;
if (!fsa_dev_ptr)
return -ENODEV;

if (copy_from_user(&dd, arg, sizeof (struct aac_delete_disk)))
return -EFAULT;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/aacraid/comminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ int aac_send_shutdown(struct aac_dev * dev)
-2 /* Timeout silently */, 1,
NULL, NULL);

if (status == 0)
if (status >= 0)
aac_fib_complete(fibctx);
aac_fib_free(fibctx);
return status;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,10 @@ static void __devexit aac_remove_one(struct pci_dev *pdev)
list_del(&aac->entry);
scsi_host_put(shost);
pci_disable_device(pdev);
if (list_empty(&aac_devices)) {
unregister_chrdev(aac_cfg_major, "aac");
aac_cfg_major = -1;
}
}

static struct pci_driver aac_pci_driver = {
Expand Down

0 comments on commit 4324c15

Please sign in to comment.