// SPDX-License-Identifier: GPL-2.0+ /* * Driver for Option High Speed Mobile Devices. * * (c) 2008 Dan Williams <dcbw@redhat.com> * * Inspiration taken from sierra_ms.c by Kevin Lloyd <klloyd@sierrawireless.com>
*/
buffer = kzalloc(RESPONSE_LEN, GFP_KERNEL); if (buffer == NULL) return USB_STOR_TRANSPORT_ERROR;
memcpy(buffer, rezero_msg, sizeof(rezero_msg));
result = usb_stor_bulk_transfer_buf(us,
us->send_bulk_pipe,
buffer, sizeof(rezero_msg), NULL); if (result != USB_STOR_XFER_GOOD) {
result = USB_STOR_XFER_ERROR; goto out;
}
/* * Some of the devices need to be asked for a response, but we don't * care what that response is.
*/
usb_stor_bulk_transfer_buf(us,
us->recv_bulk_pipe,
buffer, RESPONSE_LEN, NULL);
/* Read the CSW */
usb_stor_bulk_transfer_buf(us,
us->recv_bulk_pipe,
buffer, 13, NULL);
/* * Additional test for vendor information via INQUIRY, * because some vendor/product IDs are ambiguous
*/
result = option_inquiry(us); if (result != 0) {
usb_stor_dbg(us, "Option MS: %s\n", "vendor is not Option or not determinable, no action taken"); return 0;
} else
usb_stor_dbg(us, "Option MS: %s\n", "this is a genuine Option device, proceeding");
/* Force Modem mode */ if (option_zero_cd == ZCD_FORCE_MODEM) {
usb_stor_dbg(us, "Option MS: %s\n", "Forcing Modem Mode");
result = option_rezero(us); if (result != USB_STOR_XFER_GOOD)
usb_stor_dbg(us, "Option MS: %s\n", "Failed to switch to modem mode"); return -EIO;
} elseif (option_zero_cd == ZCD_ALLOW_MS) { /* Allow Mass Storage mode (keep CD-Rom) */
usb_stor_dbg(us, "Option MS: %s\n", "Allowing Mass Storage Mode if device requests it");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.