Skip to content

Commit e8b0264

Browse files
committed
Merge tag 'ata-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
Pull ata fix from Niklas Cassel: "Fix a bug where the SCSI Removable Media Bit (RMB) was incorrectly set for hot-plug capable (and eSATA) ports. The RMB bit means that the media is removable (e.g. floppy or CD-ROM), not that the device server is removable. If the RMB bit is set, SCSI will set the removable media sysfs attribute. If the removable media sysfs attribute is set on a device, GNOME/udisks will automatically mount the device on boot. We only want to set the SCSI RMB bit (and thus the removable media sysfs attribute) for devices where the ATA removable media device bit is set" * tag 'ata-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libata-scsi: Set the RMB bit only for removable media devices
2 parents e39388e + a6a75ed commit e8b0264

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/ata/libata-scsi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,11 +1831,11 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
18311831
2
18321832
};
18331833

1834-
/* set scsi removable (RMB) bit per ata bit, or if the
1835-
* AHCI port says it's external (Hotplug-capable, eSATA).
1834+
/*
1835+
* Set the SCSI Removable Media Bit (RMB) if the ATA removable media
1836+
* device bit (obsolete since ATA-8 ACS) is set.
18361837
*/
1837-
if (ata_id_removable(args->id) ||
1838-
(args->dev->link->ap->pflags & ATA_PFLAG_EXTERNAL))
1838+
if (ata_id_removable(args->id))
18391839
hdr[1] |= (1 << 7);
18401840

18411841
if (args->dev->class == ATA_DEV_ZAC) {

0 commit comments

Comments
 (0)