git: f1e4c095777d - main - ahc/ahd: Fix target mode operation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 10 Apr 2024 20:50:32 UTC
The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=f1e4c095777db088645008848b3bfb87146c13ec commit f1e4c095777db088645008848b3bfb87146c13ec Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2024-04-10 20:44:00 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2024-04-10 20:44:00 +0000 ahc/ahd: Fix target mode operation After 5e63cdb457f9 the drivers didn't clear CAM_DIS_DISCONNECT in ah*_handle_target_cmd() when needed, only set it. Reported/tested by: HP van Braam <hp@tmm.cx> MFC after: 1 week --- sys/dev/aic7xxx/aic79xx.c | 3 +++ sys/dev/aic7xxx/aic7xxx.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 116418dda25f..58b795a9d4ce 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -10317,7 +10317,10 @@ ahd_handle_target_cmd(struct ahd_softc *ahd, struct target_cmd *cmd) ahd->pending_device = lstate; ahd_freeze_ccb((union ccb *)atio); atio->ccb_h.flags |= CAM_DIS_DISCONNECT; + } else { + atio->ccb_h.flags &= ~CAM_DIS_DISCONNECT; } + xpt_done((union ccb*)atio); return (0); } diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 4b62f76b9cf8..9934fbcc41bb 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -7843,7 +7843,10 @@ ahc_handle_target_cmd(struct ahc_softc *ahc, struct target_cmd *cmd) ahc->pending_device = lstate; aic_freeze_ccb((union ccb *)atio); atio->ccb_h.flags |= CAM_DIS_DISCONNECT; + } else { + atio->ccb_h.flags &= ~CAM_DIS_DISCONNECT; } + xpt_done((union ccb*)atio); return (0); }