Re: Changing sd device from read only to read/write fails in 5.10 (BLKROSET)

2021-01-15 Thread Michael Katzmann
Sorry, that test in the end was inverted of course.. it should read if( (DeviceFD = open( /dev/sdb, O_RDWR )) != ERROR ) { printf("success\n"); // <== use to work (open R/W) } else { printf("failure"); // <== now fails under kernel 5.10 }

Changing sd device from read only to read/write fails in 5.10 (BLKROSET)

2021-01-15 Thread Michael Katzmann
I have USB devices that have a write enable/write protect feature. A vendor specific SCSI command write enables a write protected drive. In kernels prior to 5.10 I have been able to write-enable the drive (by sending the vendor specific command to the SCSI generic device) and then change the read o