Changeset 7c69861 in mainline


Ignore:
Timestamp:
2013-01-26T16:13:14Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6785b538
Parents:
bb512b2d
Message:

usbmast: Don't access ddf_dev member directly, use provided wrappers.

Location:
uspace/drv/bus/usb/usbmast
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/main.c

    rbb512b2d r7c69861  
    157157        }
    158158
    159         mdev->ddf_dev = dev->ddf_dev;
    160159        mdev->usb_dev = dev;
    161160
    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));
    163163        usb_log_debug("Bulk in endpoint: %d [%zuB].\n",
    164164            dev->pipes[BULK_IN_EP].pipe.endpoint_no,
     
    221221        }
    222222
    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);
    224224        if (fun == NULL) {
    225225                usb_log_error("Failed to create DDF function %s.\n", fun_name);
     
    252252        if (rc != EOK) {
    253253                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));
    255255                rc = EIO;
    256256                goto error;
     
    259259        usb_log_info("Mass storage `%s' LUN %u: " \
    260260            "%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),
    262262            lun,
    263263            inquiry.product,
     
    272272        if (rc != EOK) {
    273273                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));
    275275                rc = EIO;
    276276                goto error;
  • uspace/drv/bus/usb/usbmast/scsi_ms.c

    rbb512b2d r7c69861  
    8888                if (rc != EOK) {
    8989                        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));
    9191                        return rc;
    9292                }
     
    9696
    9797                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));
    9999
    100100                rc = usbmast_request_sense(mfun, &sense_buf, sizeof(sense_buf));
     
    147147        if (rc != EOK) {
    148148                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));
    150150                return rc;
    151151        }
     
    153153        if (cmd.status != CMDS_GOOD) {
    154154                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));
    156156                return EIO;
    157157        }
     
    215215        if (rc != EOK || cmd.status != CMDS_GOOD) {
    216216                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));
    218218                return rc;
    219219        }
     
    257257        if (rc != EOK) {
    258258                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));
    260260                return rc;
    261261        }
     
    263263        if (cmd.status != CMDS_GOOD) {
    264264                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));
    266266                return EIO;
    267267        }
     
    314314        if (rc != EOK) {
    315315                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));
    317317                return rc;
    318318        }
     
    320320        if (cmd.status != CMDS_GOOD) {
    321321                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));
    323323                return EIO;
    324324        }
     
    370370        if (rc != EOK) {
    371371                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));
    373373                return rc;
    374374        }
     
    376376        if (cmd.status != CMDS_GOOD) {
    377377                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));
    379379                return EIO;
    380380        }
  • uspace/drv/bus/usb/usbmast/usbmast.h

    rbb512b2d r7c69861  
    4343/** Mass storage device. */
    4444typedef struct usbmast_dev {
    45         /** DDF device */
    46         ddf_dev_t *ddf_dev;
    4745        /** USB device */
    4846        usb_device_t *usb_dev;
Note: See TracChangeset for help on using the changeset viewer.