Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754442AbYJOUoZ (ORCPT ); Wed, 15 Oct 2008 16:44:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751969AbYJOUoP (ORCPT ); Wed, 15 Oct 2008 16:44:15 -0400 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:38866 "EHLO g5t0006.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751735AbYJOUoO (ORCPT ); Wed, 15 Oct 2008 16:44:14 -0400 Date: Wed, 15 Oct 2008 15:44:13 -0500 From: Mike Miller To: Andrew Morton , JensAxboejens.axboe@oracle.com Cc: LKML , LKML-scsi Subject: [PATCH 2/1] cciss regression: firmware version not displayed in procfs Message-ID: <20081015204413.GA19110@roadking.ldev.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1909 Lines: 52 Patch 2 of 1 This patch fixes another regression introduced by commit 6ae5ce8e8d4de666f31286808d2285aa6a50fa40. The fiwmware version is no longer being displayed in procfs. Please consider this for inclusion. Signed-off-by: Mike Miller diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 1e1f915..09b27d5 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1631,6 +1632,7 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time) int ctlr = h->ctlr; int num_luns; ReportLunData_struct *ld_buff = NULL; + InquiryData_struct *inq_buff = NULL; int return_code; int listlength = 0; int i; @@ -1651,6 +1653,26 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time) h->busy_configuring = 1; spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); + inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL); + if (inq_buff == NULL) { + printk(KERN_ERR "cciss: out of memory\n"); + return ENOMEM; + } + + /* Get the firmware version */ + return_code = sendcmd_withirq(CISS_INQUIRY, ctlr, inq_buff, + sizeof(InquiryData_struct), 0, 0 ,0, TYPE_CMD); + if (return_code == IO_OK) { + h->firm_ver[0] = inq_buff->data_byte[32]; + h->firm_ver[1] = inq_buff->data_byte[33]; + h->firm_ver[2] = inq_buff->data_byte[34]; + h->firm_ver[3] = inq_buff->data_byte[35]; + } else { /* send command failed */ + printk(KERN_WARNING "cciss: unable to determine firmware" + " version of controller\n"); + } + + /* Get the number of logical volumes */ ld_buff = kzalloc(sizeof(ReportLunData_struct), GFP_KERNEL); if (ld_buff == NULL) goto mem_msg; -- 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/