Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE?

看板FB_hackers作者時間18年前 (2007/08/14 22:30), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/10 (看更多)
Sven Hazejager wrote: >>>> So, the question really is: how to send a IRP_MN_REMOVE_DEVICE >>>> command? >>> >>> `camcontrol da? stop` seemed to do the trick before (5.2.1-R, AFAIR), >>> but now I'm not sure (looks like it doesn't) >> >> sorry, I meant to say that `camcontrol da? stop` does not power down >> the device anymore; nonetheless, it is probably safe to disconnect it > > No, camcontrol does not support this over USB. Windows XP demonstrates > it is technically possible, and I do not believe it is fully safe to > disconnect the drive (even when unmounted), as the drive then is not > able to park its heads, which it DOES do under XP. > > So, we come back to the original question: how to send an > IRP_MN_REMOVE_DEVICE event? Maybe this helps? man camcontrol ? : cmd Allows the user to send an arbitrary SCSI CDB to any device. The cmd function requires the -c argument to specify the CDB. Other arguments are optional, depending on the command type. The command and data specification syntax is documented in cam_cdbparse(3). NOTE: If the CDB specified causes data to be transfered to or from the SCSI device in question, you MUST specify either -i or -o. -c cmd [args] This specifies the SCSI CDB. CDBs may be 6, 10, 12 or 16 bytes. -i len fmt This specifies the amount of data to read, and how it should be displayed. If the format is `-', len bytes of data will be read from the device and written to stan- dard output. -o len fmt [args] This specifies the amount of data to be written to a device, and the data that is to be written. If the format is `-', len bytes of data will be read from standard input and written to the device. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #16mRoH00 (FB_hackers)
討論串 (同標題文章)
完整討論串 (本文為第 5 之 10 篇):
文章代碼(AID): #16mRoH00 (FB_hackers)