@@ -2162,89 +2162,6 @@ lpfc_debugfs_dumpHostSlim_open(struct inode *inode, struct file *file)
21622162 return rc ;
21632163}
21642164
2165- static int
2166- lpfc_debugfs_dumpData_open (struct inode * inode , struct file * file )
2167- {
2168- struct lpfc_debug * debug ;
2169- int rc = - ENOMEM ;
2170-
2171- if (!_dump_buf_data )
2172- return - EBUSY ;
2173-
2174- debug = kmalloc (sizeof (* debug ), GFP_KERNEL );
2175- if (!debug )
2176- goto out ;
2177-
2178- /* Round to page boundary */
2179- pr_err ("9059 BLKGRD: %s: _dump_buf_data=0x%p\n" ,
2180- __func__ , _dump_buf_data );
2181- debug -> buffer = _dump_buf_data ;
2182- if (!debug -> buffer ) {
2183- kfree (debug );
2184- goto out ;
2185- }
2186-
2187- debug -> len = (1 << _dump_buf_data_order ) << PAGE_SHIFT ;
2188- file -> private_data = debug ;
2189-
2190- rc = 0 ;
2191- out :
2192- return rc ;
2193- }
2194-
2195- static int
2196- lpfc_debugfs_dumpDif_open (struct inode * inode , struct file * file )
2197- {
2198- struct lpfc_debug * debug ;
2199- int rc = - ENOMEM ;
2200-
2201- if (!_dump_buf_dif )
2202- return - EBUSY ;
2203-
2204- debug = kmalloc (sizeof (* debug ), GFP_KERNEL );
2205- if (!debug )
2206- goto out ;
2207-
2208- /* Round to page boundary */
2209- pr_err ("9060 BLKGRD: %s: _dump_buf_dif=x%px file=%pD\n" ,
2210- __func__ , _dump_buf_dif , file );
2211- debug -> buffer = _dump_buf_dif ;
2212- if (!debug -> buffer ) {
2213- kfree (debug );
2214- goto out ;
2215- }
2216-
2217- debug -> len = (1 << _dump_buf_dif_order ) << PAGE_SHIFT ;
2218- file -> private_data = debug ;
2219-
2220- rc = 0 ;
2221- out :
2222- return rc ;
2223- }
2224-
2225- static ssize_t
2226- lpfc_debugfs_dumpDataDif_write (struct file * file , const char __user * buf ,
2227- size_t nbytes , loff_t * ppos )
2228- {
2229- /*
2230- * The Data/DIF buffers only save one failing IO
2231- * The write op is used as a reset mechanism after an IO has
2232- * already been saved to the next one can be saved
2233- */
2234- spin_lock (& _dump_buf_lock );
2235-
2236- memset ((void * )_dump_buf_data , 0 ,
2237- ((1 << PAGE_SHIFT ) << _dump_buf_data_order ));
2238- memset ((void * )_dump_buf_dif , 0 ,
2239- ((1 << PAGE_SHIFT ) << _dump_buf_dif_order ));
2240-
2241- _dump_buf_done = 0 ;
2242-
2243- spin_unlock (& _dump_buf_lock );
2244-
2245- return nbytes ;
2246- }
2247-
22482165static ssize_t
22492166lpfc_debugfs_dif_err_read (struct file * file , char __user * buf ,
22502167 size_t nbytes , loff_t * ppos )
@@ -2457,17 +2374,6 @@ lpfc_debugfs_release(struct inode *inode, struct file *file)
24572374 return 0 ;
24582375}
24592376
2460- static int
2461- lpfc_debugfs_dumpDataDif_release (struct inode * inode , struct file * file )
2462- {
2463- struct lpfc_debug * debug = file -> private_data ;
2464-
2465- debug -> buffer = NULL ;
2466- kfree (debug );
2467-
2468- return 0 ;
2469- }
2470-
24712377/**
24722378 * lpfc_debugfs_multixripools_write - Clear multi-XRI pools statistics
24732379 * @file: The file pointer to read from.
@@ -5448,26 +5354,6 @@ static const struct file_operations lpfc_debugfs_op_cpucheck = {
54485354 .release = lpfc_debugfs_release ,
54495355};
54505356
5451- #undef lpfc_debugfs_op_dumpData
5452- static const struct file_operations lpfc_debugfs_op_dumpData = {
5453- .owner = THIS_MODULE ,
5454- .open = lpfc_debugfs_dumpData_open ,
5455- .llseek = lpfc_debugfs_lseek ,
5456- .read = lpfc_debugfs_read ,
5457- .write = lpfc_debugfs_dumpDataDif_write ,
5458- .release = lpfc_debugfs_dumpDataDif_release ,
5459- };
5460-
5461- #undef lpfc_debugfs_op_dumpDif
5462- static const struct file_operations lpfc_debugfs_op_dumpDif = {
5463- .owner = THIS_MODULE ,
5464- .open = lpfc_debugfs_dumpDif_open ,
5465- .llseek = lpfc_debugfs_lseek ,
5466- .read = lpfc_debugfs_read ,
5467- .write = lpfc_debugfs_dumpDataDif_write ,
5468- .release = lpfc_debugfs_dumpDataDif_release ,
5469- };
5470-
54715357#undef lpfc_debugfs_op_dif_err
54725358static const struct file_operations lpfc_debugfs_op_dif_err = {
54735359 .owner = THIS_MODULE ,
@@ -5864,20 +5750,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
58645750 } else
58655751 phba -> debug_dumpHostSlim = NULL ;
58665752
5867- /* Setup dumpData */
5868- snprintf (name , sizeof (name ), "dumpData" );
5869- phba -> debug_dumpData =
5870- debugfs_create_file (name , S_IFREG |S_IRUGO |S_IWUSR ,
5871- phba -> hba_debugfs_root ,
5872- phba , & lpfc_debugfs_op_dumpData );
5873-
5874- /* Setup dumpDif */
5875- snprintf (name , sizeof (name ), "dumpDif" );
5876- phba -> debug_dumpDif =
5877- debugfs_create_file (name , S_IFREG |S_IRUGO |S_IWUSR ,
5878- phba -> hba_debugfs_root ,
5879- phba , & lpfc_debugfs_op_dumpDif );
5880-
58815753 /* Setup DIF Error Injections */
58825754 snprintf (name , sizeof (name ), "InjErrLBA" );
58835755 phba -> debug_InjErrLBA =
@@ -6255,12 +6127,6 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
62556127 debugfs_remove (phba -> debug_dumpHostSlim ); /* HostSlim */
62566128 phba -> debug_dumpHostSlim = NULL ;
62576129
6258- debugfs_remove (phba -> debug_dumpData ); /* dumpData */
6259- phba -> debug_dumpData = NULL ;
6260-
6261- debugfs_remove (phba -> debug_dumpDif ); /* dumpDif */
6262- phba -> debug_dumpDif = NULL ;
6263-
62646130 debugfs_remove (phba -> debug_InjErrLBA ); /* InjErrLBA */
62656131 phba -> debug_InjErrLBA = NULL ;
62666132
0 commit comments