Commit aac9e28d2f3d3c1eacc4114d685864a2a6423b80

Authored by Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] ibmvscsi: Prevent IO during partner login
  [SCSI] lpfc : Correct queue tag handling
  [SCSI] Update MAINTAINER email address and trees
  [SCSI] osst: fix if (...) \n #if... cases missing semicolons when false

Showing 4 changed files Side-by-side Diff

... ... @@ -2549,7 +2549,7 @@
2549 2549  
2550 2550 MISCELLANEOUS MCA-SUPPORT
2551 2551 P: James Bottomley
2552   -M: jejb@steeleye.com
  2552 +M: James.Bottomley@HansenPartnership.com
2553 2553 L: linux-kernel@vger.kernel.org
2554 2554 S: Maintained
2555 2555  
2556 2556  
... ... @@ -3301,9 +3301,11 @@
3301 3301  
3302 3302 SCSI SUBSYSTEM
3303 3303 P: James E.J. Bottomley
3304   -M: James.Bottomley@SteelEye.com
  3304 +M: James.Bottomley@HansenPartnership.com
3305 3305 L: linux-scsi@vger.kernel.org
3306 3306 T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
  3307 +T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
  3308 +T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-pending-2.6.git
3307 3309 S: Maintained
3308 3310  
3309 3311 SCSI TAPE DRIVER
drivers/scsi/ibmvscsi/ibmvscsi.c
... ... @@ -556,7 +556,7 @@
556 556 unsigned long timeout)
557 557 {
558 558 u64 *crq_as_u64 = (u64 *) &evt_struct->crq;
559   - int request_status;
  559 + int request_status = 0;
560 560 int rc;
561 561  
562 562 /* If we have exhausted our request limit, just fail this request,
... ... @@ -574,6 +574,13 @@
574 574 if (request_status < -1)
575 575 goto send_error;
576 576 /* Otherwise, we may have run out of requests. */
  577 + /* If request limit was 0 when we started the adapter is in the
  578 + * process of performing a login with the server adapter, or
  579 + * we may have run out of requests.
  580 + */
  581 + else if (request_status == -1 &&
  582 + evt_struct->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
  583 + goto send_busy;
577 584 /* Abort and reset calls should make it through.
578 585 * Nothing except abort and reset should use the last two
579 586 * slots unless we had two or less to begin with.
... ... @@ -633,7 +640,8 @@
633 640 unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev);
634 641  
635 642 free_event_struct(&hostdata->pool, evt_struct);
636   - atomic_inc(&hostdata->request_limit);
  643 + if (request_status != -1)
  644 + atomic_inc(&hostdata->request_limit);
637 645 return SCSI_MLQUEUE_HOST_BUSY;
638 646  
639 647 send_error:
640 648  
... ... @@ -927,10 +935,11 @@
927 935 login->req_buf_fmt = SRP_BUF_FORMAT_DIRECT | SRP_BUF_FORMAT_INDIRECT;
928 936  
929 937 spin_lock_irqsave(hostdata->host->host_lock, flags);
930   - /* Start out with a request limit of 1, since this is negotiated in
931   - * the login request we are just sending
  938 + /* Start out with a request limit of 0, since this is negotiated in
  939 + * the login request we are just sending and login requests always
  940 + * get sent by the driver regardless of request_limit.
932 941 */
933   - atomic_set(&hostdata->request_limit, 1);
  942 + atomic_set(&hostdata->request_limit, 0);
934 943  
935 944 rc = ibmvscsi_send_srp_event(evt_struct, hostdata, init_timeout * 2);
936 945 spin_unlock_irqrestore(hostdata->host->host_lock, flags);
drivers/scsi/lpfc/lpfc_scsi.c
... ... @@ -682,6 +682,7 @@
682 682 IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb;
683 683 struct lpfc_iocbq *piocbq = &(lpfc_cmd->cur_iocbq);
684 684 int datadir = scsi_cmnd->sc_data_direction;
  685 + char tag[2];
685 686  
686 687 lpfc_cmd->fcp_rsp->rspSnsLen = 0;
687 688 /* clear task management bits */
... ... @@ -692,8 +693,8 @@
692 693  
693 694 memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, 16);
694 695  
695   - if (scsi_cmnd->device->tagged_supported) {
696   - switch (scsi_cmnd->tag) {
  696 + if (scsi_populate_tag_msg(scsi_cmnd, tag)) {
  697 + switch (tag[0]) {
697 698 case HEAD_OF_QUEUE_TAG:
698 699 fcp_cmnd->fcpCntl1 = HEAD_OF_Q;
699 700 break;
... ... @@ -593,10 +593,11 @@
593 593 if (aux->frame_type != OS_FRAME_TYPE_DATA &&
594 594 aux->frame_type != OS_FRAME_TYPE_EOD &&
595 595 aux->frame_type != OS_FRAME_TYPE_MARKER) {
596   - if (!quiet)
  596 + if (!quiet) {
597 597 #if DEBUG
598 598 printk(OSST_DEB_MSG "%s:D: Skipping frame, frame type %x\n", name, aux->frame_type);
599 599 #endif
  600 + }
600 601 goto err_out;
601 602 }
602 603 if (aux->frame_type == OS_FRAME_TYPE_EOD &&
603 604  
... ... @@ -606,11 +607,12 @@
606 607 goto err_out;
607 608 }
608 609 if (frame_seq_number != -1 && ntohl(aux->frame_seq_num) != frame_seq_number) {
609   - if (!quiet)
  610 + if (!quiet) {
610 611 #if DEBUG
611 612 printk(OSST_DEB_MSG "%s:D: Skipping frame, sequence number %u (expected %d)\n",
612 613 name, ntohl(aux->frame_seq_num), frame_seq_number);
613 614 #endif
  615 + }
614 616 goto err_out;
615 617 }
616 618 if (aux->frame_type == OS_FRAME_TYPE_MARKER) {