Changeset 7c69861 in mainline
- Timestamp:
- 2013-01-26T16:13:14Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6785b538
- Parents:
- bb512b2d
- Location:
- uspace/drv/bus/usb/usbmast
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmast/main.c
rbb512b2d r7c69861 157 157 } 158 158 159 mdev->ddf_dev = dev->ddf_dev;160 159 mdev->usb_dev = dev; 161 160 162 usb_log_info("Initializing mass storage `%s'.\n", ddf_dev_get_name(dev->ddf_dev)); 161 usb_log_info("Initializing mass storage `%s'.\n", 162 usb_device_get_name(dev)); 163 163 usb_log_debug("Bulk in endpoint: %d [%zuB].\n", 164 164 dev->pipes[BULK_IN_EP].pipe.endpoint_no, … … 221 221 } 222 222 223 fun = ddf_fun_create(mdev->ddf_dev, fun_exposed, fun_name);223 fun = usb_device_ddf_fun_create(mdev->usb_dev, fun_exposed, fun_name); 224 224 if (fun == NULL) { 225 225 usb_log_error("Failed to create DDF function %s.\n", fun_name); … … 252 252 if (rc != EOK) { 253 253 usb_log_warning("Failed to inquire device `%s': %s.\n", 254 ddf_dev_get_name(mdev->ddf_dev), str_error(rc));254 usb_device_get_name(mdev->usb_dev), str_error(rc)); 255 255 rc = EIO; 256 256 goto error; … … 259 259 usb_log_info("Mass storage `%s' LUN %u: " \ 260 260 "%s by %s rev. %s is %s (%s).\n", 261 ddf_dev_get_name(mdev->ddf_dev),261 usb_device_get_name(mdev->usb_dev), 262 262 lun, 263 263 inquiry.product, … … 272 272 if (rc != EOK) { 273 273 usb_log_warning("Failed to read capacity, device `%s': %s.\n", 274 ddf_dev_get_name(mdev->ddf_dev), str_error(rc));274 usb_device_get_name(mdev->usb_dev), str_error(rc)); 275 275 rc = EIO; 276 276 goto error; -
uspace/drv/bus/usb/usbmast/scsi_ms.c
rbb512b2d r7c69861 88 88 if (rc != EOK) { 89 89 usb_log_error("Inquiry transport failed, device %s: %s.\n", 90 ddf_dev_get_name(mfun->mdev->ddf_dev), str_error(rc));90 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 91 91 return rc; 92 92 } … … 96 96 97 97 usb_log_error("SCSI command failed, device %s.\n", 98 ddf_dev_get_name(mfun->mdev->ddf_dev));98 usb_device_get_name(mfun->mdev->usb_dev)); 99 99 100 100 rc = usbmast_request_sense(mfun, &sense_buf, sizeof(sense_buf)); … … 147 147 if (rc != EOK) { 148 148 usb_log_error("Inquiry transport failed, device %s: %s.\n", 149 ddf_dev_get_name(mfun->mdev->ddf_dev), str_error(rc));149 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 150 150 return rc; 151 151 } … … 153 153 if (cmd.status != CMDS_GOOD) { 154 154 usb_log_error("Inquiry command failed, device %s.\n", 155 ddf_dev_get_name(mfun->mdev->ddf_dev));155 usb_device_get_name(mfun->mdev->usb_dev)); 156 156 return EIO; 157 157 } … … 215 215 if (rc != EOK || cmd.status != CMDS_GOOD) { 216 216 usb_log_error("Request Sense failed, device %s: %s.\n", 217 ddf_dev_get_name(mfun->mdev->ddf_dev), str_error(rc));217 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 218 218 return rc; 219 219 } … … 257 257 if (rc != EOK) { 258 258 usb_log_error("Read Capacity (10) transport failed, device %s: %s.\n", 259 ddf_dev_get_name(mfun->mdev->ddf_dev), str_error(rc));259 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 260 260 return rc; 261 261 } … … 263 263 if (cmd.status != CMDS_GOOD) { 264 264 usb_log_error("Read Capacity (10) command failed, device %s.\n", 265 ddf_dev_get_name(mfun->mdev->ddf_dev));265 usb_device_get_name(mfun->mdev->usb_dev)); 266 266 return EIO; 267 267 } … … 314 314 if (rc != EOK) { 315 315 usb_log_error("Read (10) transport failed, device %s: %s.\n", 316 ddf_dev_get_name(mfun->mdev->ddf_dev), str_error(rc));316 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 317 317 return rc; 318 318 } … … 320 320 if (cmd.status != CMDS_GOOD) { 321 321 usb_log_error("Read (10) command failed, device %s.\n", 322 ddf_dev_get_name(mfun->mdev->ddf_dev));322 usb_device_get_name(mfun->mdev->usb_dev)); 323 323 return EIO; 324 324 } … … 370 370 if (rc != EOK) { 371 371 usb_log_error("Write (10) transport failed, device %s: %s.\n", 372 ddf_dev_get_name(mfun->mdev->ddf_dev), str_error(rc));372 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 373 373 return rc; 374 374 } … … 376 376 if (cmd.status != CMDS_GOOD) { 377 377 usb_log_error("Write (10) command failed, device %s.\n", 378 ddf_dev_get_name(mfun->mdev->ddf_dev));378 usb_device_get_name(mfun->mdev->usb_dev)); 379 379 return EIO; 380 380 } -
uspace/drv/bus/usb/usbmast/usbmast.h
rbb512b2d r7c69861 43 43 /** Mass storage device. */ 44 44 typedef struct usbmast_dev { 45 /** DDF device */46 ddf_dev_t *ddf_dev;47 45 /** USB device */ 48 46 usb_device_t *usb_dev;
Note:
See TracChangeset
for help on using the changeset viewer.