From patchwork Wed Jul 5 22:51:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9827301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3351060361 for ; Wed, 5 Jul 2017 22:51:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32ACE2040D for ; Wed, 5 Jul 2017 22:51:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26EB9205FC; Wed, 5 Jul 2017 22:51:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAF042040D for ; Wed, 5 Jul 2017 22:51:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752040AbdGEWvh (ORCPT ); Wed, 5 Jul 2017 18:51:37 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:35146 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751886AbdGEWvg (ORCPT ); Wed, 5 Jul 2017 18:51:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=09j0qBdgm5aof7KV8tYR1XSqMZ+I/jzZT0qFWUTEag0=; b=SK9iP80AkAkpFxVe4d2MKWyuD pwCqEKT2PItNu0PkIe1Z/9pB5um06EmRigS3AeyzpbBXIeQRlmwxkB6ZPwWdFCHGzQm/D7h4IFA2+ W9PN+FXNKqFZNgpM6mQ/pj2JQcPf+9q9uc5z0DmhQbdfTUzmBIyJW7+3BZn7nvqtz3vo55W7TUlTL xCabDbD1Baj9N/DPmqPtBR9mTLUmonuabxjft4g7jdlSlWVhRnRBqtA2FW9ninyKWUR962A0jDwNX XNg58bn0JyE6caYp/uatWPV/TbKlk/WEbDqT6udHtVsIIxMMT9DE/K3adCPKbOi3QwfRkiWhKZAXc 07JAS0njg==; Received: from hch by bombadil.infradead.org with local (Exim 4.87 #1 (Red Hat Linux)) id 1dSt8w-0001lf-9l; Wed, 05 Jul 2017 22:51:34 +0000 Date: Wed, 5 Jul 2017 15:51:34 -0700 From: Christoph Hellwig To: Meelis Roos Cc: Linux Kernel list , linux-block@vger.kernel.org Subject: Re: OOPS from cciss_ioctl in 4.12+git Message-ID: <20170705225134.GA31786@infradead.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Meelis, can you try the patch below? Also we're trying to move people away from the cciss driver, can you check if the hpsa SCSI driver works for you as well? diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 02a611993bb4..678af946be30 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1944,6 +1944,13 @@ static void cciss_get_serial_no(ctlr_info_t *h, int logvol, return; } +static void cciss_initialize_rq(struct request *rq) +{ + struct scsi_request *sreq = blk_mq_rq_to_pdu(rq); + + scsi_req_init(sreq); +} + /* * cciss_add_disk sets up the block device queue for a logical drive */ @@ -1956,6 +1963,7 @@ static int cciss_add_disk(ctlr_info_t *h, struct gendisk *disk, disk->queue->cmd_size = sizeof(struct scsi_request); disk->queue->request_fn = do_cciss_request; + disk->queue->initialize_rq_fn = cciss_initialize_rq; disk->queue->queue_lock = &h->lock; queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, disk->queue); if (blk_init_allocated_queue(disk->queue) < 0)