From aa75137cd95e615f7e72cb1c2af1d7ac7c1e9ccf Mon Sep 17 00:00:00 2001 From: mav Date: Sun, 26 Feb 2017 19:25:33 +0000 Subject: [PATCH] Fix LUN enabling on wildcard target, as done by CTL. MFC after: 2 weeks --- sys/dev/aic7xxx/aic79xx.c | 3 ++- sys/dev/aic7xxx/aic7xxx.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 76b9c7e801ea..958876a53277 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -9918,7 +9918,8 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) u_int our_id; our_id = ahd->our_id; - if (ccb->ccb_h.target_id != our_id) { + if (ccb->ccb_h.target_id != our_id + && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) { if ((ahd->features & AHD_MULTI_TID) != 0 && (ahd->flags & AHD_INITIATORROLE) != 0) { /* diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index daf7aedae29b..ec4908b14ebb 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -7347,7 +7347,8 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) else our_id = ahc->our_id_b; - if (ccb->ccb_h.target_id != our_id) { + if (ccb->ccb_h.target_id != our_id + && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) { /* * our_id represents our initiator ID, or * the ID of the first target to have an