SCSI fixes for 5.6-rc3
Subsystems (5)
James Bottomley
maintainerFour small fixes. Three are in drivers for fairly obvious bugs. The fourth is a set of regressions introduced by the compat_ioctl changes because some of the compat updates wrongly replaced .ioctl instead of .compat_ioctl.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Adam Williamson (1):
scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places
Benjamin Block (1):
scsi: zfcp: fix wrong data and display format of SFP+ temperature
Damien Le Moal (1):
scsi: sd_sbc: Fix sd_zbc_report_zones()
Igor Druzhinin (1):
scsi: libfc: free response frame from GPN_ID
And the diffstat:
drivers/block/paride/pcd.c | 2 +- drivers/cdrom/gdrom.c | 2 +- drivers/ide/ide-gd.c | 2 +- drivers/s390/scsi/zfcp_fsf.h | 2 +- drivers/s390/scsi/zfcp_sysfs.c | 2 +- drivers/scsi/libfc/fc_disc.c | 2 ++ drivers/scsi/sd_zbc.c | 7 ++++++- drivers/scsi/sr.c | 2 +- 8 files changed, 14 insertions(+), 7 deletions(-)
With full diff below.
James
---
drivers/block/paride/pcd.c +1 -1
@@ -276,7 +276,7 @@ static const struct block_device_operations pcd_bdops = { .release = pcd_block_release, .ioctl = pcd_block_ioctl, #ifdef CONFIG_COMPAT - .ioctl = blkdev_compat_ptr_ioctl, + .compat_ioctl = blkdev_compat_ptr_ioctl, #endif .check_events = pcd_block_check_events, };
drivers/cdrom/gdrom.c +1 -1
@@ -519,7 +519,7 @@ static const struct block_device_operations gdrom_bdops = { .check_events = gdrom_bdops_check_events, .ioctl = gdrom_bdops_ioctl, #ifdef CONFIG_COMPAT - .ioctl = blkdev_compat_ptr_ioctl, + .compat_ioctl = blkdev_compat_ptr_ioctl,#endif };
drivers/ide/ide-gd.c +1 -1
@@ -361,7 +361,7 @@ static const struct block_device_operations ide_gd_ops = { .release = ide_gd_release, .ioctl = ide_gd_ioctl, #ifdef CONFIG_COMPAT - .ioctl = ide_gd_compat_ioctl, + .compat_ioctl = ide_gd_compat_ioctl, #endif .getgeo = ide_gd_getgeo, .check_events = ide_gd_check_events,
drivers/s390/scsi/zfcp_fsf.h +1 -1
@@ -410,7 +410,7 @@ struct fsf_qtcb_bottom_port {u8 cb_util;u8 a_util;u8 res2; -u16 temperature; +s16 temperature;u16 vcc;u16 tx_bias;u16 tx_power;
drivers/s390/scsi/zfcp_sysfs.c +1 -1
@@ -800,7 +800,7 @@ static ZFCP_DEV_ATTR(adapter_diag, b2b_credit, 0400, static ZFCP_DEV_ATTR(adapter_diag_sfp, _name, 0400, \ zfcp_sysfs_adapter_diag_sfp_##_name##_show, NULL) -ZFCP_DEFINE_DIAG_SFP_ATTR(temperature, temperature, 5, "%hu"); +ZFCP_DEFINE_DIAG_SFP_ATTR(temperature, temperature, 6, "%hd"); ZFCP_DEFINE_DIAG_SFP_ATTR(vcc, vcc, 5, "%hu"); ZFCP_DEFINE_DIAG_SFP_ATTR(tx_bias, tx_bias, 5, "%hu"); ZFCP_DEFINE_DIAG_SFP_ATTR(tx_power, tx_power, 5, "%hu");
drivers/scsi/libfc/fc_disc.c +2 -0
@@ -628,6 +628,8 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp, } out:kref_put (&rdata->kref, fc_rport_destroy); +if (!IS_ERR (fp)) +fc_frame_free (fp); }/**
drivers/scsi/sd_zbc.c +6 -1
@@ -161,6 +161,7 @@ int sd_zbc_report_zones(struct gendisk *disk, sector_t sector, unsigned int nr_zones, report_zones_cb cb, void *data) { struct scsi_disk *sdkp = scsi_disk(disk); +sector_t capacity =logical_to_sectors (sdkp->device, sdkp->capacity);unsigned int nr, i;unsigned char *buf;size_t offset, buflen =0 ;
@@ -171,11 +172,15 @@ int sd_zbc_report_zones(struct gendisk *disk, sector_t sector,/* Not a zoned device */ return -EOPNOTSUPP ; +if (!capacity) +/* Device gone or invalid */ +return -ENODEV ; + buf =sd_zbc_alloc_report_buffer (sdkp, nr_zones, &buflen);if (!buf)return -ENOMEM ; -while (zone_idx < nr_zones && sector <get_capacity (disk)) { +while (zone_idx < nr_zones && sector < capacity) { ret =sd_zbc_do_report_zones (sdkp, buf, buflen,sectors_to_logical (sdkp->device, sector), true);if (ret)
drivers/scsi/sr.c +1 -1
@@ -688,7 +688,7 @@ static const struct block_device_operations sr_bdops = .release = sr_block_release, .ioctl = sr_block_ioctl, #ifdef CONFIG_COMPAT - .ioctl = sr_block_compat_ioctl, + .compat_ioctl = sr_block_compat_ioctl, #endif .check_events = sr_block_check_events, .revalidate_disk = sr_block_revalidate_disk,
The pull request you sent on Sat, 29 Feb 2020 09:14:28 -0500:
The pull request you sent on Sat, 29 Feb 2020 09:14:28 -0500:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7557c1b3f715624f3bd4c809f03771ce9384eb7b
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker