Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932855AbXASCat (ORCPT ); Thu, 18 Jan 2007 21:30:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932856AbXASCat (ORCPT ); Thu, 18 Jan 2007 21:30:49 -0500 Received: from mga05.intel.com ([192.55.52.89]:45107 "EHLO fmsmga101.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932855AbXASCas (ORCPT ); Thu, 18 Jan 2007 21:30:48 -0500 X-ExtLoop1: 1 X-IronPort-AV: i="4.13,207,1167638400"; d="scan'208"; a="189808360:sNHT18078991" Subject: Re: Questions on PCI express AER support in HBA driver From: "Zhang, Yanmin" To: Allexio Ju Cc: linux-pci@atrey.karlin.mff.cuni.cz, linas@austin.ibm.com, yanmin.zhang@intel.com, linux-kernel@vger.kernel.org In-Reply-To: References: Content-Type: text/plain; charset=utf-8 Date: Fri, 19 Jan 2007 10:30:49 +0800 Message-Id: <1169173849.15989.273.camel@ymzhang> Mime-Version: 1.0 X-Mailer: Evolution 2.9.2 (2.9.2-2.fc7) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1553 Lines: 35 On Thu, 2007-01-18 at 12:46 -0800, Allexio Ju wrote: > > What are the expected changes on SCSI LLD driver in regards to PCIE > > AER supporting? I understood that the driver need to call following > > APIs during probing to enable AER support for the device, > > --- > > if (pci_find_aer_capability(dev)) { > > pci_enable_pcie_error_reporting(dev); > > } This is just to enable the error reporting of the device. One of the important parts of AER is error recovery. When an AER error happens, device will send an error message to root port. Then, root port will notify kernel by interrupt. Kernel will print out error message, and do error recovery to recover the related devices. Such recovery need device drivers to provide a couple of callbacks. Documentation/pci-error-recovery.txt has the detailed callback definitions and the recovery steps. > > --- > > What else does SCSI LLD driver need to changed? Usually, 3 callbacks are enough while error_detected is must. int (*error_detected)(struct pci_dev *dev, enum pci_channel_state); int (*slot_reset)(struct pci_dev *dev); void (*resume)(struct pci_dev *dev); You could refer to the patches of e1000 drivers written by Linas, or just read the source codes of the 3 callbacks of e1000 drivers in the latest kernel. Yanmin - 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/