Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 403a39f8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "This is seven small fixes which are all for user visible issues that
  fortunately only occur in rare circumstances.

  The most serious is the sr one in which QEMU can cause us to read
  beyond the end of a buffer (I don't think it's exploitable, but just
  in case).

  The next is the sd capacity fix which means all non 512 byte sector
  drives greater than 2TB fail to be correctly sized.

  The rest are either in new drivers (qedf) or on error legs"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ipr: do not set DID_PASSTHROUGH on CHECK CONDITION
  scsi: aacraid: fix PCI error recovery path
  scsi: sd: Fix capacity calculation with 32-bit sector_t
  scsi: qla2xxx: Add fix to read correct register value for ISP82xx.
  scsi: qedf: Fix crash due to unsolicited FIP VLAN response.
  scsi: sr: Sanity check returned mode data
  scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable
parents be84a46c 0e1bfea9
Loading
Loading
Loading
Loading
+8 −3
Original line number Original line Diff line number Diff line
@@ -1690,9 +1690,6 @@ struct aac_dev
#define aac_adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) \
#define aac_adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4) \
	(dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4)
	(dev)->a_ops.adapter_sync_cmd(dev, command, p1, p2, p3, p4, p5, p6, status, r1, r2, r3, r4)


#define aac_adapter_check_health(dev) \
	(dev)->a_ops.adapter_check_health(dev)

#define aac_adapter_restart(dev, bled, reset_type) \
#define aac_adapter_restart(dev, bled, reset_type) \
	((dev)->a_ops.adapter_restart(dev, bled, reset_type))
	((dev)->a_ops.adapter_restart(dev, bled, reset_type))


@@ -2615,6 +2612,14 @@ static inline unsigned int cap_to_cyls(sector_t capacity, unsigned divisor)
	return capacity;
	return capacity;
}
}


static inline int aac_adapter_check_health(struct aac_dev *dev)
{
	if (unlikely(pci_channel_offline(dev->pdev)))
		return -1;

	return (dev)->a_ops.adapter_check_health(dev);
}

/* SCp.phase values */
/* SCp.phase values */
#define AAC_OWNER_MIDLEVEL	0x101
#define AAC_OWNER_MIDLEVEL	0x101
#define AAC_OWNER_LOWLEVEL	0x102
#define AAC_OWNER_LOWLEVEL	0x102
+2 −1
Original line number Original line Diff line number Diff line
@@ -1873,7 +1873,8 @@ int aac_check_health(struct aac_dev * aac)
	spin_unlock_irqrestore(&aac->fib_lock, flagv);
	spin_unlock_irqrestore(&aac->fib_lock, flagv);


	if (BlinkLED < 0) {
	if (BlinkLED < 0) {
		printk(KERN_ERR "%s: Host adapter dead %d\n", aac->name, BlinkLED);
		printk(KERN_ERR "%s: Host adapter is dead (or got a PCI error) %d\n",
				aac->name, BlinkLED);
		goto out;
		goto out;
	}
	}


+6 −1
Original line number Original line Diff line number Diff line
@@ -6293,6 +6293,11 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg,
		break;
		break;
	case IPR_IOASC_MED_DO_NOT_REALLOC: /* prevent retries */
	case IPR_IOASC_MED_DO_NOT_REALLOC: /* prevent retries */
	case IPR_IOASA_IR_DUAL_IOA_DISABLED:
	case IPR_IOASA_IR_DUAL_IOA_DISABLED:
		/*
		 * exception: do not set DID_PASSTHROUGH on CHECK CONDITION
		 * so SCSI mid-layer and upper layers handle it accordingly.
		 */
		if (scsi_cmd->result != SAM_STAT_CHECK_CONDITION)
			scsi_cmd->result |= (DID_PASSTHROUGH << 16);
			scsi_cmd->result |= (DID_PASSTHROUGH << 16);
		break;
		break;
	case IPR_IOASC_BUS_WAS_RESET:
	case IPR_IOASC_BUS_WAS_RESET:
+2 −1
Original line number Original line Diff line number Diff line
@@ -99,6 +99,7 @@ static void qedf_fcoe_process_vlan_resp(struct qedf_ctx *qedf,
		qedf_set_vlan_id(qedf, vid);
		qedf_set_vlan_id(qedf, vid);


		/* Inform waiter that it's ok to call fcoe_ctlr_link up() */
		/* Inform waiter that it's ok to call fcoe_ctlr_link up() */
		if (!completion_done(&qedf->fipvlan_compl))
			complete(&qedf->fipvlan_compl);
			complete(&qedf->fipvlan_compl);
	}
	}
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -2803,6 +2803,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
		atomic_set(&qedf->num_offloads, 0);
		atomic_set(&qedf->num_offloads, 0);
		qedf->stop_io_on_error = false;
		qedf->stop_io_on_error = false;
		pci_set_drvdata(pdev, qedf);
		pci_set_drvdata(pdev, qedf);
		init_completion(&qedf->fipvlan_compl);


		QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_INFO,
		QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_INFO,
		   "QLogic FastLinQ FCoE Module qedf %s, "
		   "QLogic FastLinQ FCoE Module qedf %s, "
Loading