Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261667AbUK2Kr5 (ORCPT ); Mon, 29 Nov 2004 05:47:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261665AbUK2Krk (ORCPT ); Mon, 29 Nov 2004 05:47:40 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:61842 "EHLO fgwmail6.fujitsu.co.jp") by vger.kernel.org with ESMTP id S261656AbUK2Klh (ORCPT ); Mon, 29 Nov 2004 05:41:37 -0500 Date: Mon, 29 Nov 2004 19:43:10 +0900 From: Takao Indoh Subject: [ANNOUNCE 4/7] Diskdump 1.0 Release In-reply-to: <3AC4D5FF1413D5indou.takao@soft.fujitsu.com> To: linux-kernel@vger.kernel.org, lkdump-develop@lists.sourceforge.net Message-id: <3EC4D600387C1Dindou.takao@soft.fujitsu.com> MIME-version: 1.0 X-Mailer: TuruKame 3.71 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: <3AC4D5FF1413D5indou.takao@soft.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4165 Lines: 132 This is a patch for aic7xxx/aic79xx driver. diff -Nur linux-2.6.9.org/drivers/scsi/aic7xxx/aic79xx_osm.c linux-2.6.9/drivers/scsi/aic7xxx/aic79xx_osm.c --- linux-2.6.9.org/drivers/scsi/aic7xxx/aic79xx_osm.c 2004-10-19 06:54:31.000000000 +0900 +++ linux-2.6.9/drivers/scsi/aic7xxx/aic79xx_osm.c 2004-11-24 15:34:24.424699040 +0900 @@ -781,6 +781,8 @@ static int ahd_linux_bus_reset(Scsi_Cmnd *); static int ahd_linux_dev_reset(Scsi_Cmnd *); static int ahd_linux_abort(Scsi_Cmnd *); +static int ahd_linux_sanity_check(struct scsi_device *); +static void ahd_linux_poll(struct scsi_device *); /* * Calculate a safe value for AHD_NSEG (as expressed through ahd_linux_nseg). @@ -1679,6 +1681,8 @@ .slave_alloc = ahd_linux_slave_alloc, .slave_configure = ahd_linux_slave_configure, .slave_destroy = ahd_linux_slave_destroy, + .dump_sanity_check = ahd_linux_sanity_check, + .dump_poll = ahd_linux_poll, }; /**************************** Tasklet Handler *********************************/ @@ -4186,6 +4190,39 @@ return IRQ_RETVAL(ours); } +static int +ahd_linux_sanity_check(struct scsi_device *device) +{ + struct ahd_softc *ahd; + struct ahd_linux_device *dev; + + ahd = *(struct ahd_softc **)device->host->hostdata; + dev = ahd_linux_get_device(ahd, device->channel, + device->id, device->lun, + /*alloc*/FALSE); + + if (dev == NULL) + return -ENXIO; + if (ahd->platform_data->qfrozen || dev->qfrozen) + return -EBUSY; + if (spin_is_locked(&ahd->platform_data->spin_lock)) + return -EBUSY; + return 0; +} + +static void +ahd_linux_poll(struct scsi_device *device) +{ + struct ahd_softc *ahd; + int ours; + + ahd = *(struct ahd_softc **)device->host->hostdata; + ours = ahd_intr(ahd); + if (ahd_linux_next_device_to_run(ahd) != NULL) + ahd_schedule_runq(ahd); + ahd_linux_run_complete_queue(ahd); +} + void ahd_platform_flushwork(struct ahd_softc *ahd) { diff -Nur linux-2.6.9.org/drivers/scsi/aic7xxx/aic7xxx_osm.c linux-2.6.9/drivers/scsi/aic7xxx/aic7xxx_osm.c --- linux-2.6.9.org/drivers/scsi/aic7xxx/aic7xxx_osm.c 2004-10-19 06:53:11.000000000 +0900 +++ linux-2.6.9/drivers/scsi/aic7xxx/aic7xxx_osm.c 2004-11-24 15:34:24.427628728 +0900 @@ -772,6 +772,8 @@ static int ahc_linux_bus_reset(Scsi_Cmnd *); static int ahc_linux_dev_reset(Scsi_Cmnd *); static int ahc_linux_abort(Scsi_Cmnd *); +static int ahc_linux_sanity_check(struct scsi_device *); +static void ahc_linux_poll(struct scsi_device *); /* * Calculate a safe value for AHC_NSEG (as expressed through ahc_linux_nseg). @@ -1308,6 +1310,8 @@ .slave_alloc = ahc_linux_slave_alloc, .slave_configure = ahc_linux_slave_configure, .slave_destroy = ahc_linux_slave_destroy, + .dump_sanity_check = ahc_linux_sanity_check, + .dump_poll = ahc_linux_poll, }; /**************************** Tasklet Handler *********************************/ @@ -3861,6 +3865,41 @@ return IRQ_RETVAL(ours); } +static int +ahc_linux_sanity_check(struct scsi_device *device) +{ + struct ahc_softc *ahc; + struct ahc_linux_device *dev; + + ahc = *(struct ahc_softc **)device->host->hostdata; + dev = ahc_linux_get_device(ahc, device->channel, + device->id, device->lun, + /*alloc*/FALSE); + if (dev == NULL) + return -ENXIO; + if (ahc->platform_data->qfrozen || dev->qfrozen) + return -EBUSY; + if (spin_is_locked(&ahc->platform_data->spin_lock)) + return -EBUSY; + return 0; +} + +static void +ahc_linux_poll(struct scsi_device *device) +{ + struct ahc_softc *ahc; + struct ahc_linux_device *dev; + + ahc = *(struct ahc_softc **)device->host->hostdata; + ahc_intr(ahc); + while ((dev = ahc_linux_next_device_to_run(ahc)) != NULL) { + TAILQ_REMOVE(&ahc->platform_data->device_runq, dev, links); + dev->flags &= ~AHC_DEV_ON_RUN_LIST; + ahc_linux_check_device_queue(ahc, dev); + } + ahc_linux_run_complete_queue(ahc); +} + void ahc_platform_flushwork(struct ahc_softc *ahc) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/