Deleted Added
full compact
ustorage_fs.c (194677) ustorage_fs.c (195121)
1/* $FreeBSD: head/sys/dev/usb/storage/ustorage_fs.c 194677 2009-06-23 02:19:59Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/storage/ustorage_fs.c 195121 2009-06-27 21:23:30Z thompsa $ */
2/*-
3 * Copyright (C) 2003-2005 Alan Stern
4 * Copyright (C) 2008 Hans Petter Selasky
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 460 unchanged lines hidden (view full) ---

470 mtx_unlock(&sc->sc_mtx);
471 usbd_transfer_drain(sc->sc_xfer[sc->sc_last_xfer_index]);
472 mtx_lock(&sc->sc_mtx);
473}
474
475static int
476ustorage_fs_handle_request(device_t dev,
477 const void *preq, void **pptr, uint16_t *plen,
2/*-
3 * Copyright (C) 2003-2005 Alan Stern
4 * Copyright (C) 2008 Hans Petter Selasky
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 460 unchanged lines hidden (view full) ---

470 mtx_unlock(&sc->sc_mtx);
471 usbd_transfer_drain(sc->sc_xfer[sc->sc_last_xfer_index]);
472 mtx_lock(&sc->sc_mtx);
473}
474
475static int
476ustorage_fs_handle_request(device_t dev,
477 const void *preq, void **pptr, uint16_t *plen,
478 uint16_t offset, uint8_t is_complete)
478 uint16_t offset, uint8_t *pstate)
479{
480 struct ustorage_fs_softc *sc = device_get_softc(dev);
481 const struct usb_device_request *req = preq;
479{
480 struct ustorage_fs_softc *sc = device_get_softc(dev);
481 const struct usb_device_request *req = preq;
482 uint8_t is_complete = *pstate;
482
483 if (!is_complete) {
484 if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) &&
485 (req->bRequest == UR_BBB_RESET)) {
486 *plen = 0;
487 mtx_lock(&sc->sc_mtx);
488 ustorage_fs_transfer_stop(sc);
489 sc->sc_transfer.data_error = 1;

--- 1457 unchanged lines hidden ---
483
484 if (!is_complete) {
485 if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) &&
486 (req->bRequest == UR_BBB_RESET)) {
487 *plen = 0;
488 mtx_lock(&sc->sc_mtx);
489 ustorage_fs_transfer_stop(sc);
490 sc->sc_transfer.data_error = 1;

--- 1457 unchanged lines hidden ---