Deleted Added
full compact
ahciem.c (259222) ahciem.c (271261)
1/*-
2 * Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/ahci/ahciem.c 259222 2013-12-11 17:40:35Z mav $");
28__FBSDID("$FreeBSD: head/sys/dev/ahci/ahciem.c 271261 2014-09-08 12:11:49Z mav $");
29
30#include <sys/param.h>
31#include <sys/module.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/bus.h>
35#include <sys/conf.h>
36#include <sys/endian.h>

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

339 enc->status[c][3] |= SESCTL_RQSFLT;
340 else
341 enc->status[c][3] &= SESCTL_RQSFLT;
342 }
343 ahci_em_setleds(led->dev, c);
344}
345
346static int
29
30#include <sys/param.h>
31#include <sys/module.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/bus.h>
35#include <sys/conf.h>
36#include <sys/endian.h>

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

339 enc->status[c][3] |= SESCTL_RQSFLT;
340 else
341 enc->status[c][3] &= SESCTL_RQSFLT;
342 }
343 ahci_em_setleds(led->dev, c);
344}
345
346static int
347ahci_check_ids(device_t dev, union ccb *ccb)
347ahci_check_ids(union ccb *ccb)
348{
349
350 if (ccb->ccb_h.target_id != 0) {
351 ccb->ccb_h.status = CAM_TID_INVALID;
352 xpt_done(ccb);
353 return (-1);
354 }
355 if (ccb->ccb_h.target_lun != 0) {

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

549
550 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
551 ("ahciemaction func_code=%x\n", ccb->ccb_h.func_code));
552
553 enc = cam_sim_softc(sim);
554 dev = enc->dev;
555 switch (ccb->ccb_h.func_code) {
556 case XPT_ATA_IO: /* Execute the requested I/O operation */
348{
349
350 if (ccb->ccb_h.target_id != 0) {
351 ccb->ccb_h.status = CAM_TID_INVALID;
352 xpt_done(ccb);
353 return (-1);
354 }
355 if (ccb->ccb_h.target_lun != 0) {

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

549
550 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
551 ("ahciemaction func_code=%x\n", ccb->ccb_h.func_code));
552
553 enc = cam_sim_softc(sim);
554 dev = enc->dev;
555 switch (ccb->ccb_h.func_code) {
556 case XPT_ATA_IO: /* Execute the requested I/O operation */
557 if (ahci_check_ids(dev, ccb))
557 if (ahci_check_ids(ccb))
558 return;
559 ahci_em_begin_transaction(dev, ccb);
560 return;
561 case XPT_RESET_BUS: /* Reset the specified bus */
562 case XPT_RESET_DEV: /* Bus Device Reset the specified device */
563 ahci_em_reset(dev);
564 ccb->ccb_h.status = CAM_REQ_CMP;
565 break;

--- 43 unchanged lines hidden ---
558 return;
559 ahci_em_begin_transaction(dev, ccb);
560 return;
561 case XPT_RESET_BUS: /* Reset the specified bus */
562 case XPT_RESET_DEV: /* Bus Device Reset the specified device */
563 ahci_em_reset(dev);
564 ccb->ccb_h.status = CAM_REQ_CMP;
565 break;

--- 43 unchanged lines hidden ---