Commit 8965de70 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:
 "Three fixes in drivers with no impact to core code.

  The mptfusion fix is enormous because the driver API had to be
  rethreaded to pass down the necessary iocp pointer, but once that's
  done a significant chunk of code is deleted.

  The other two patches are small"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: mptfusion: Fix double fetch bug in ioctl
  scsi: storvsc: Correctly set number of hardware queues for IDE disk
  scsi: fnic: fix invalid stack access
parents f04dba64 28d76df1
This diff is collapsed.
...@@ -688,26 +688,26 @@ int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done) ...@@ -688,26 +688,26 @@ int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done)
int vnic_dev_hang_notify(struct vnic_dev *vdev) int vnic_dev_hang_notify(struct vnic_dev *vdev)
{ {
u64 a0, a1; u64 a0 = 0, a1 = 0;
int wait = 1000; int wait = 1000;
return vnic_dev_cmd(vdev, CMD_HANG_NOTIFY, &a0, &a1, wait); return vnic_dev_cmd(vdev, CMD_HANG_NOTIFY, &a0, &a1, wait);
} }
int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr) int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
{ {
u64 a0, a1; u64 a[2] = {};
int wait = 1000; int wait = 1000;
int err, i; int err, i;
for (i = 0; i < ETH_ALEN; i++) for (i = 0; i < ETH_ALEN; i++)
mac_addr[i] = 0; mac_addr[i] = 0;
err = vnic_dev_cmd(vdev, CMD_MAC_ADDR, &a0, &a1, wait); err = vnic_dev_cmd(vdev, CMD_MAC_ADDR, &a[0], &a[1], wait);
if (err) if (err)
return err; return err;
for (i = 0; i < ETH_ALEN; i++) for (i = 0; i < ETH_ALEN; i++)
mac_addr[i] = ((u8 *)&a0)[i]; mac_addr[i] = ((u8 *)&a)[i];
return 0; return 0;
} }
...@@ -732,30 +732,30 @@ void vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast, ...@@ -732,30 +732,30 @@ void vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast,
void vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr) void vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr)
{ {
u64 a0 = 0, a1 = 0; u64 a[2] = {};
int wait = 1000; int wait = 1000;
int err; int err;
int i; int i;
for (i = 0; i < ETH_ALEN; i++) for (i = 0; i < ETH_ALEN; i++)
((u8 *)&a0)[i] = addr[i]; ((u8 *)&a)[i] = addr[i];
err = vnic_dev_cmd(vdev, CMD_ADDR_ADD, &a0, &a1, wait); err = vnic_dev_cmd(vdev, CMD_ADDR_ADD, &a[0], &a[1], wait);
if (err) if (err)
pr_err("Can't add addr [%pM], %d\n", addr, err); pr_err("Can't add addr [%pM], %d\n", addr, err);
} }
void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr) void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr)
{ {
u64 a0 = 0, a1 = 0; u64 a[2] = {};
int wait = 1000; int wait = 1000;
int err; int err;
int i; int i;
for (i = 0; i < ETH_ALEN; i++) for (i = 0; i < ETH_ALEN; i++)
((u8 *)&a0)[i] = addr[i]; ((u8 *)&a)[i] = addr[i];
err = vnic_dev_cmd(vdev, CMD_ADDR_DEL, &a0, &a1, wait); err = vnic_dev_cmd(vdev, CMD_ADDR_DEL, &a[0], &a[1], wait);
if (err) if (err)
pr_err("Can't del addr [%pM], %d\n", addr, err); pr_err("Can't del addr [%pM], %d\n", addr, err);
} }
......
...@@ -1842,8 +1842,10 @@ static int storvsc_probe(struct hv_device *device, ...@@ -1842,8 +1842,10 @@ static int storvsc_probe(struct hv_device *device,
*/ */
host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT); host->sg_tablesize = (stor_device->max_transfer_bytes >> PAGE_SHIFT);
/* /*
* For non-IDE disks, the host supports multiple channels.
* Set the number of HW queues we are supporting. * Set the number of HW queues we are supporting.
*/ */
if (!dev_is_ide)
host->nr_hw_queues = num_present_cpus(); host->nr_hw_queues = num_present_cpus();
/* /*
......
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