Commit 770b0ffe authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Minor fixes only.

  The sd.c one ignores a sync cache request if format is in progress
  which can happen if formatting a drive across suspend/resume"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: sd: Ignore command SYNCHRONIZE CACHE error if format in progress
  scsi: aacraid: Fix double-free on probe failure
  scsi: lpfc: Fix overflow build issue
parents 6a2fcc51 4f9eedfa
...@@ -642,6 +642,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) ...@@ -642,6 +642,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
if (aac_comm_init(dev)<0){ if (aac_comm_init(dev)<0){
kfree(dev->queues); kfree(dev->queues);
dev->queues = NULL;
return NULL; return NULL;
} }
/* /*
...@@ -649,6 +650,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) ...@@ -649,6 +650,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
*/ */
if (aac_fib_setup(dev) < 0) { if (aac_fib_setup(dev) < 0) {
kfree(dev->queues); kfree(dev->queues);
dev->queues = NULL;
return NULL; return NULL;
} }
......
...@@ -5410,7 +5410,7 @@ lpfc_get_cgnbuf_info(struct bsg_job *job) ...@@ -5410,7 +5410,7 @@ lpfc_get_cgnbuf_info(struct bsg_job *job)
struct get_cgnbuf_info_req *cgnbuf_req; struct get_cgnbuf_info_req *cgnbuf_req;
struct lpfc_cgn_info *cp; struct lpfc_cgn_info *cp;
uint8_t *cgn_buff; uint8_t *cgn_buff;
int size, cinfosz; size_t size, cinfosz;
int rc = 0; int rc = 0;
if (job->request_len < sizeof(struct fc_bsg_request) + if (job->request_len < sizeof(struct fc_bsg_request) +
......
...@@ -1823,13 +1823,15 @@ static int sd_sync_cache(struct scsi_disk *sdkp) ...@@ -1823,13 +1823,15 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
(sshdr.asc == 0x74 && sshdr.ascq == 0x71)) /* drive is password locked */ (sshdr.asc == 0x74 && sshdr.ascq == 0x71)) /* drive is password locked */
/* this is no error here */ /* this is no error here */
return 0; return 0;
/* /*
* This drive doesn't support sync and there's not much * If a format is in progress or if the drive does not
* we can do because this is called during shutdown * support sync, there is not much we can do because
* or suspend so just return success so those operations * this is called during shutdown or suspend so just
* can proceed. * return success so those operations can proceed.
*/ */
if (sshdr.sense_key == ILLEGAL_REQUEST) if ((sshdr.asc == 0x04 && sshdr.ascq == 0x04) ||
sshdr.sense_key == ILLEGAL_REQUEST)
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment